package com.example.diggold;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.Toast;

public class MainActivity extends Activity {
	

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        addListenerOnButton();
    }

	public void addListenerOnButton() {
		 
		ImageButton startButton = (ImageButton) findViewById(R.id.startButton);
		ImageButton quitButton = (ImageButton) findViewById(R.id.quitButton);
		

		
		startButton.setOnClickListener(new OnClickListener() {
			@Override 
			public void onClick(View arg0) {
			   Toast.makeText(MainActivity.this,
				"ImageButton is clicked!", Toast.LENGTH_SHORT).show();

			    startActivity(new Intent(MainActivity.this, change_image.class));
		        //setContentView(R.layout.game_room);
			}
		});
		
		quitButton.setOnClickListener(new OnClickListener() {
			public void onClick(View arg0) {
				finish();
			}
		});
	}
  
}
